<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set value="${pageContext.request.contextPath}" var="basePath"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="${basePath}">
<title>Upload Page</title>
</head>

<body>
    <div style="position: absolute; top:0px; left:0px; right:0px; bottom:0px;">

        <div style="position: absolute; top:0px; left:0px; width:400px; bottom:0px; padding: 10px; box-sizing: border-box;">
            <h3>Upload File</h3><hr>
            <form action="${basePath}/UploadBySpringMVC" method="POST" enctype="multipart/form-data">
                 <input type="file" name="file" value="Please Choose File:"/>
                 <input type="submit" value="Upload"/>
            </form>
        </div>

        <div style="position: absolute; top:0px; right:0px; left:400px; bottom:0px; padding: 10px; box-sizing: border-box;">
            <h3>File List</h3><hr>
            <c:forEach items="${fileList}" var="file" varStatus="status">
                ${status.index}&nbsp;&nbsp;&nbsp;&nbsp;<a href="${basePath}/UploadDir/${file}" target="_blank">${file}<a><br>
            </c:forEach>
        </div>
    </div>
</body>
</html>
